package com.beifu.manager.service.assetintruth.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.beifu.manager.dao.AssetInTruthMapper;
import com.beifu.manager.model.AssetInTruth;
import com.beifu.manager.model.AssetInTruthExample;
import com.beifu.manager.service.assetintruth.AssetInTruthService;
import com.utils.PageUtils;

/**
 * 
* Title: RoleServiceImpl
* Description:
* @author    BaiBing
* @date      2018年6月10日
 */
@Service
public class AssetInTruthServiceImpl implements AssetInTruthService {

    
    @Autowired
    private AssetInTruthMapper assetInTruthMapper;

    
    
    @Override
    public PageUtils getAssetInTruthPage(PageUtils page){
    	 AssetInTruthExample example = (AssetInTruthExample) page.getQueryParames();
    	 List<AssetInTruth> list = assetInTruthMapper.getAssetInTruthPage((page.getPage()-1)*page.getLimit(),page.getLimit(), example);
    	 int count = assetInTruthMapper.countByExample(example);
         page.setList(list);
         page.setCountNum(count);
         return page;
	}

    public List<AssetInTruth> getAssetInTruthByAssetInTruthExample(AssetInTruthExample assetInTruthExample){
        List<AssetInTruth> list = assetInTruthMapper.selectByExample(assetInTruthExample);
        return list;
    }
}
